<template>
    <div>
        <table>
            <tr>
                <td>会员名称</td>
                <td>
                    <span>{{ data.Name }}</span>
                </td>
            </tr>
            
            <tr>
                <td>性别</td>
                <td>
                    <span>{{ data.Sex==1?"男":"女" }}</span>
                </td>
            </tr>

            <tr>
                <td>会员生日</td>
                <td>
                  <span>{{ data.Stime }}</span>
                </td>
            </tr>

            <tr>
                <td>电话号</td>
                <td>
                    <span>{{ data.Phone }}</span>
                </td>
            </tr>

            <tr>
                <td>地址</td>
                <td>
                    <span>{{ data.Address }}</span>
                </td>
            </tr>

            <tr>
                <td></td>
                <td>
                    <a href="/list">返回显示</a>
                </td>
            </tr>
        </table>
    </div>
</template>

<script setup lang="ts">

import {ref,onMounted} from 'vue';
import axios from 'axios';
import moment from 'moment';


const data =ref({
    "Id": 0,
  "Name": "",
  "Sex": 0,
  "Stime": "",
  "Phone": "",
  "Address": "",
  "Delid": true
})

onMounted(() => {
   XQ(); 
});

const XQ=()=>{
    axios.get("https://localhost:7146/api/Vip/FtVip",{params:{id:localStorage["id"]}}).then(
    res=>{

        data.value=res.data;
        data.value.Stime=moment(data.value.Stime).format('YYYY-MM-DD');
    })
}


</script>

<style scoped>

</style>